﻿<form id="form1" runat="server">
    <div id="tree"></div>
</form>
<script type="text/javascript">
    var AppID = '@ViewData["appid"]';
    var isselect = '';
    var roadTree = null;
    $(function ()
    {
        roadTree = new RoadUI.Tree({ id: "tree", path: "Tree1?@Html.Raw(ViewData["query"])", refreshpath: "TreeRefresh?@Html.Raw(ViewData["query"])", onclick: openUrl });
    });
    function openUrl(json)
    {
        if (json.id == "myshare") {
            parent.frames[1].location = "MyShare?@Html.Raw(ViewData["query"])";
        } else if (json.id == "sharemy") {
            parent.frames[1].location = "ShareMy?@Html.Raw(ViewData["query"])";
        } else {
            parent.frames[1].location = "List?id=" + json.id + "&@Html.Raw(ViewData["query"])";
        }
    }
    function reLoad(id)
    {
        roadTree.refresh(id);
    }
</script>
